Field
The described embodiments relate to computer systems. More specifically, the described embodiments relate to techniques for performing scriptable dynamic load balancing in computer systems.
Related Art
Some computer systems support load balancing. Generally, load balancing involves distributing compute workloads or “loads,” such as tasks, operations, sets of one or more instructions, functions/methods, etc., to multiple processors (e.g., microprocessors, processor cores, compute units, application specific integrated circuits, embedded processors, etc.) to be performed thereon. For some computer systems, called “homogeneous-processing systems,” in which the multiple processors have similar properties/characteristics and optimizations, techniques for load balancing have been well-studied and many implementations proposed. In other systems, called “heterogeneous-processing systems,” in which the multiple processors include processors having different properties/characteristics and optimizations, techniques for efficiently load balancing are not as well-developed.
Generally, to improve the load-processing performance (efficiency, speed, etc.) of a heterogeneous-processing computer system, a load balancer may distribute the load among the multiple processors based on attributes of the load and/or characteristics of the processors. In some existing heterogeneous-processing computer systems, a load balancer performs “static” load balancing, for which a predetermined set of rules (e.g., rules that are hard-coded into hardware or firmware, etc.) are used by the load balancer to distribute the load among the processors in the computer system. In other existing heterogeneous-processing computer systems, a load balancer performs “dynamic” load balancing, for which loads are dynamically divided into multiple portions (blocks, packets, compute jobs, etc.), and each portion is assigned to a queue for a corresponding one of the multiple processors based on processor load, load type, etc. In such computer systems, the load balancer may assign additional portions of the load to the processor by placing these portions in the corresponding queue as space becomes available. As a result, faster processors may process more portions of the load, and slower processors may process fewer portions of the load.
Although using a load balancer to distribute loads can improve the load-processing performance of a heterogeneous-processing computer system, designers using load balancers face a tradeoff between adaptability and simplicity. For example, a load balancer that uses static load balancing, with the associated hard-coded rules, can be simpler to implement, but may not easily adapt to new types and arrangements of processors, types of loads, or computer system architectures. Conversely, a dynamic load balancer may more readily adapt to new types and arrangements of processors or computer system architectures and/or types of loads, but require significant time and resources to initially implement and maintain/update.
In the figures, like reference numerals refer to the same figure elements.